﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ElementClasses;

namespace ExMen
{
    class ExClass: ExternalElement
    {

        byte[] sourceData;

        public override string Name { get { return "GirlsMen"; } }

        public override string MenuName { get { return "Девушки"; } }

        public override void ChangeSourceData(ChangeDataEvents ChangeDataEvent, byte[] NewSourceData){ sourceData = NewSourceData;}

        public override byte[] GetSourceData() { return sourceData; }

        public override void Init()
        {
            Form1 frm = new Form1();
            sourceData = frm.GetSrsData();
        }

        public override void NotifyMenuBotton_Click()
        {
            IsEdit = true;
            Form1 frm = new Form1();
            if (frm.ShowDialog((byte[])sourceData.Clone()))
            {
                sourceData = frm.GetSrsData();
                IsSaveData = true;
            }
            frm.Dispose();
            IsEdit = false;
        }
    }
}
